<?php
use yii\helpers\Html;
use yii\helpers\Url;

use common\models\MktFriend;
?>
<a href="<?= Url::to(['market-profile', 'id'=>$model->friendUser->id]); ?>" class="weui_media_box weui_media_appmsg">
    <div class="weui_media_hd">
        <img class="weui_media_appmsg_thumb" src="<?php echo \common\wosotech\Util::getWxUserHeadimgurl($model->friendUser->theHeadimgurl, 46); ?>" alt="">
    </div>
    <div class="weui_media_bd">
        <div class="weui_media_title"><span class="name"><?php echo $model->friendUser->theName; ?></span></div>
        <p class="weui_media_desc"><?php echo $model->friendUser->theCompany; ?></p>
    </div>
    <div style="float:right;">
        <input name="deleteFriend" onclick="deleteFriend(<?php echo $model->friendUser->id; ?>, '<?php echo $model->friendUser->name; ?>'); return false;" style="margin-top: -20px;" type="button" class="weui_btn weui_btn_mini weui_btn_default" value="删除"></input>
        <input name="sendMessage" onclick="gotoChat(<?php echo $model->friendUser->id; ?>); return false;"  style="margin-top: -20px;" type="button" class="weui_btn weui_btn_mini weui_btn_primary" value="发消息"></input>
    </div>
</a>

<?php
/*
`$model`: mixed, the data model
`$key`: mixed, the key value associated with the data item
`$index`: integer, the zero-based index of the data item in the items array returned by [[dataProvider]].
`$widget`: ListView, this widget instance

		<a href="" class="weui_media_box weui_media_appmsg">
			<div class="weui_media_hd">
				<img class="weui_media_appmsg_thumb" src="resources/images/avatar/tx.jpg" alt="">
			</div>
			<div class="weui_media_bd">
				<div class="weui_media_title"><span class="name">肖丽芳</span></div>
				<p class="weui_media_desc">天才宝贝光谷中心</p>
			</div>
			<div style="float:right;">
                <input style="margin-top: -20px;" type="button" class="weui_btn weui_btn_mini weui_btn_default" value="删除"></input>
                <input style="margin-top: -20px;" type="button" class="weui_btn weui_btn_mini weui_btn_primary" value="发消息"></input>
            </div>
		</a>

*/